<!doctype html>



  


<html class="theme-next muse use-motion">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />












  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  
    
      
    

    
  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Microsoft YaHei:300,300italic,400,400italic,700,700italic|consolas:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.4.0" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.0.2" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="ionic," />








  <link rel="shortcut icon" type="image/x-icon" href="http://ofy7k3v4s.bkt.clouddn.com/mylogo.png?v=5.0.2" />






<meta name="description" content="ionic Cssionic css&amp;#x662F;&amp;#x4EC0;&amp;#x4E48;&amp;#x53EF;&amp;#x4EE5;&amp;#x53EA;&amp;#x4F7F;&amp;#x7528; ionic &amp;#x7684; CSS &amp;#x6846;&amp;#x67B6;&amp;#xFF1A;&amp;#x76F4;&amp;#x63A5;&amp;#x5728; HTML &amp;#x4E2D;&amp;#x5F15;&amp;#x5165; ionic.css &amp;#x5C31;&amp;">
<meta property="og:type" content="article">
<meta property="og:title" content="ionic css笔记">
<meta property="og:url" content="https://hongqinma.github.io/2016/12/07/s016-ioionic-css笔记/index.html">
<meta property="og:site_name" content="HongqinMa' Blog">
<meta property="og:description" content="ionic Cssionic css&amp;#x662F;&amp;#x4EC0;&amp;#x4E48;&amp;#x53EF;&amp;#x4EE5;&amp;#x53EA;&amp;#x4F7F;&amp;#x7528; ionic &amp;#x7684; CSS &amp;#x6846;&amp;#x67B6;&amp;#xFF1A;&amp;#x76F4;&amp;#x63A5;&amp;#x5728; HTML &amp;#x4E2D;&amp;#x5F15;&amp;#x5165; ionic.css &amp;#x5C31;&amp;">
<meta property="og:image" content="https://hongqinma.github.io/2016/12/07/s016-ioionic-css笔记/ionic03.png">
<meta property="og:image" content="https://hongqinma.github.io/2016/12/07/s016-ioionic-css笔记/ionic04.png">
<meta property="og:image" content="https://hongqinma.github.io/2016/12/07/s016-ioionic-css笔记/ionic05.png">
<meta property="og:image" content="https://hongqinma.github.io/2016/12/07/s016-ioionic-css笔记/ionic06.png">
<meta property="og:image" content="https://hongqinma.github.io/2016/12/07/s016-ioionic-css笔记/ionic07.png">
<meta property="og:image" content="https://hongqinma.github.io/2016/12/07/s016-ioionic-css笔记/ionic08.png">
<meta property="og:image" content="https://hongqinma.github.io/2016/12/07/s016-ioionic-css笔记/ionic09.png">
<meta property="og:image" content="https://hongqinma.github.io/2016/12/07/s016-ioionic-css笔记/ionic10.png">
<meta property="og:image" content="https://hongqinma.github.io/2016/12/07/s016-ioionic-css笔记/ionic11.png">
<meta property="og:image" content="https://hongqinma.github.io/2016/12/07/s016-ioionic-css笔记/ionic12.png">
<meta property="og:image" content="https://hongqinma.github.io/2016/12/07/s016-ioionic-css笔记/ionic13.png">
<meta property="og:image" content="https://hongqinma.github.io/2016/12/07/s016-ioionic-css笔记/ionic14.png">
<meta property="og:image" content="https://hongqinma.github.io/2016/12/07/s016-ioionic-css笔记/ionic15.png">
<meta property="og:image" content="https://hongqinma.github.io/2016/12/07/s016-ioionic-css笔记/ionic16.png">
<meta property="og:updated_time" content="2016-12-23T01:15:07.724Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="ionic css笔记">
<meta name="twitter:description" content="ionic Cssionic css&amp;#x662F;&amp;#x4EC0;&amp;#x4E48;&amp;#x53EF;&amp;#x4EE5;&amp;#x53EA;&amp;#x4F7F;&amp;#x7528; ionic &amp;#x7684; CSS &amp;#x6846;&amp;#x67B6;&amp;#xFF1A;&amp;#x76F4;&amp;#x63A5;&amp;#x5728; HTML &amp;#x4E2D;&amp;#x5F15;&amp;#x5165; ionic.css &amp;#x5C31;&amp;">
<meta name="twitter:image" content="https://hongqinma.github.io/2016/12/07/s016-ioionic-css笔记/ionic03.png">



<script type="text/javascript" id="hexo.configuration">
  var NexT = window.NexT || {};
  var CONFIG = {
    scheme: 'Muse',
    sidebar: {"position":"left","display":"post"},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '6347850919329138000',
      author: 'Hiraku'
    }
  };
</script>




  <link rel="canonical" href="https://hongqinma.github.io/2016/12/07/s016-ioionic-css笔记/"/>


  <title> ionic css笔记 | HongqinMa' Blog </title>
</head>

<body itemscope itemtype="//schema.org/WebPage" lang="en">

  



  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "//hm.baidu.com/hm.js?10010323";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>








  
  
    
  

  <div class="container one-collumn sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="//schema.org/WPHeader">
      <div class="header-inner"><div class="site-meta custom-logo">
  
    <div class="site-meta-headline">
      <a>
        <img class="custom-logo-image" src="http://ofy7k3v4s.bkt.clouddn.com/photo.jpg"
             alt="HongqinMa' Blog"/>
      </a>
    </div>
  

  <div class="custom-logo-site-title">
    <a href="/"  class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <span class="site-title">HongqinMa' Blog</span>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>
  <p class="site-subtitle">Spell at all costs， to rush you in the future。</p>
</div>

<div class="site-nav-toggle">
  <button>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
  </button>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            Home
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            Categories
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            About
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            Archives
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            Tags
          </a>
        </li>
      

      
    </ul>
  

  
</nav>

 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  
  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="//schema.org/Article">

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                ionic css笔记
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            <span class="post-meta-item-icon">
              <i class="fa fa-calendar-o"></i>
            </span>
            <span class="post-meta-item-text">Posted on</span>
            <time itemprop="dateCreated" datetime="2016-12-07T18:44:52+08:00" content="2016-12-07">
              2016-12-07
            </time>
          </span>

          
            <span class="post-category" >
              &nbsp; | &nbsp;
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">In</span>
              
                <span itemprop="about" itemscope itemtype="https://schema.org/Thing">
                  <a href="/categories/Hybrid-APP-开发系列/" itemprop="url" rel="index">
                    <span itemprop="name">Hybrid APP 开发系列</span>
                  </a>
                </span>

                
                

              
            </span>
          

          
            
              <span class="post-comments-count">
                &nbsp; | &nbsp;
                <a href="/2016/12/07/s016-ioionic-css笔记/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count ds-thread-count" data-thread-key="2016/12/07/s016-ioionic-css笔记/" itemprop="commentsCount"></span>
                </a>
              </span>
            
          

          

          

          
              &nbsp; | &nbsp;
              <span class="page-pv"><i class="fa fa-file-o"></i>
              <span class="busuanzi-value" id="busuanzi_value_page_pv" ></span>
              </span>
          

          
            <span id="busuanzi_container_page_pv">  <span id="busuanzi_value_page_pv"></span> Views</span>
          
        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        <h2 id="ionic-Css"><a href="#ionic-Css" class="headerlink" title="ionic Css"></a>ionic Css</h2><h3 id="ionic-css&#x662F;&#x4EC0;&#x4E48;"><a href="#ionic-css&#x662F;&#x4EC0;&#x4E48;" class="headerlink" title="ionic css&#x662F;&#x4EC0;&#x4E48;"></a>ionic css&#x662F;&#x4EC0;&#x4E48;</h3><p>&#x53EF;&#x4EE5;&#x53EA;&#x4F7F;&#x7528; ionic &#x7684; CSS &#x6846;&#x67B6;&#xFF1A;&#x76F4;&#x63A5;&#x5728; HTML &#x4E2D;&#x5F15;&#x5165; ionic.css &#x5C31;&#x53EF;&#x4EE5;&#x4E86;&#x3002;ionic &#x7684; CSS &#x6846;&#x67B6;&#x4E3B;&#x8981;&#x63D0;&#x4F9B;&#x9884;&#x5B9A;&#x4E49;&#x7684; CSS &#x7C7B;&#xFF0C;&#x6765;&#x5E2E;&#x52A9;&#x6211;&#x4EEC;&#x5FEB;&#x901F;&#x6784;&#x5EFA;&#x9002;&#x7528;&#x4E8E;&#x624B;&#x673A;&#x7AEF;&#x7684; UI&#x3002;</p>
<h3 id="Ionic-css&#x7EC4;&#x6210;"><a href="#Ionic-css&#x7EC4;&#x6210;" class="headerlink" title="Ionic css&#x7EC4;&#x6210;"></a>Ionic css&#x7EC4;&#x6210;</h3><blockquote>
<p>&#x57FA;&#x672C;&#x5E03;&#x5C40;&#x7C7B;<br>&#x989C;&#x8272;&#x548C;&#x56FE;&#x6807;&#x7C7B;<br>&#x754C;&#x9762;&#x7EC4;&#x4EF6;&#x7C7B;<br>&#x6805;&#x683C;&#x7CFB;&#x7EDF;&#x7C7B;</p>
</blockquote>
<h3 id="&#x5E03;&#x5C40;"><a href="#&#x5E03;&#x5C40;" class="headerlink" title="&#x5E03;&#x5C40;"></a>&#x5E03;&#x5C40;</h3><h4 id="&#x5B9A;&#x9AD8;&#x6761;&#x5757;&#x5B9A;&#x4E49;"><a href="#&#x5B9A;&#x9AD8;&#x6761;&#x5757;&#x5B9A;&#x4E49;" class="headerlink" title="&#x5B9A;&#x9AD8;&#x6761;&#x5757;&#x5B9A;&#x4E49;"></a>&#x5B9A;&#x9AD8;&#x6761;&#x5757;&#x5B9A;&#x4E49;</h4><p>.bar&#x2014;&#x2014;&#x5C06;&#x5143;&#x7D20;&#x58F0;&#x660E;&#x4E3A;&#x5C4F;&#x5E55;&#x4E0A;&#x7EDD;&#x5BF9;&#x5B9A;&#x4F4D;&#x7684;&#x5757;&#x72B6;&#x533A;&#x57DF;&#xFF0C;&#x5177;&#x6709;&#x56FA;&#x5B9A;&#x7684;&#x9AD8;&#x5EA6;&#xFF08;44px&#xFF09;</p>
<h4 id="&#x6761;&#x5757;&#x4F4D;&#x7F6E;"><a href="#&#x6761;&#x5757;&#x4F4D;&#x7F6E;" class="headerlink" title="&#x6761;&#x5757;&#x4F4D;&#x7F6E;"></a>&#x6761;&#x5757;&#x4F4D;&#x7F6E;</h4><p>.bar-header - &#x7F6E;&#x9876;<br>.bar-subheader - header&#x4E4B;&#x4E0B;&#x7F6E;&#x9876;<br>.bar-footer - &#x7F6E;&#x5E95;<br>.bar-subfooter - footer&#x4E4B;&#x4E0A;&#x7F6E;&#x5E95;</p>
<h3 id="&#x5185;&#x5BB9;"><a href="#&#x5185;&#x5BB9;" class="headerlink" title="&#x5185;&#x5BB9;"></a>&#x5185;&#x5BB9;</h3><p>.content - &#x6D41;&#x5F0F;&#x5B9A;&#x4F4D;&#xFF0C;&#x5185;&#x5BB9;&#x5728;&#x6587;&#x6863;&#x6D41;&#x4E2D;&#x6309;&#x987A;&#x5E8F;&#x5B9A;&#x4F4D;<br>.scroll-content - &#x7EDD;&#x5BF9;&#x5B9A;&#x4F4D;&#xFF0C;&#x5185;&#x5BB9;&#x5143;&#x7D20;&#x5360;&#x6EE1;&#x6574;&#x4E2A;&#x5C4F;&#x5E55;</p>
<p><img src="/2016/12/07/s016-ioionic-css&#x7B14;&#x8BB0;/ionic03.png" alt="&#x5185;&#x5BB9;"></p>
<h3 id="bar&#x5B50;&#x5143;&#x7D20;"><a href="#bar&#x5B50;&#x5143;&#x7D20;" class="headerlink" title="bar&#x5B50;&#x5143;&#x7D20;"></a>bar&#x5B50;&#x5143;&#x7D20;</h3><p>&#x6709;&#x4E09;&#x79CD;.bar&#x5B50;&#x5143;&#x7D20;&#x7684;&#x6837;&#x5F0F;&#x662F;&#x9884;&#x5B9A;&#x4E49;&#x7684;&#xFF1A;</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">any</span> <span class="attr">class</span>=<span class="string">&quot;bar&quot;</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">any</span> <span class="attr">class</span>=<span class="string">&quot;title&quot;</span>&gt;</span>...<span class="tag">&lt;/<span class="name">any</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">any</span>&gt;</span></div></pre></td></tr></table></figure>
<p>&#x6807;&#x9898;&#x6587;&#x5B57; - &#x5BF9;&#x5305;&#x542B;&#x6807;&#x9898;&#x6587;&#x5B57;&#x7684;&#x5143;&#x7D20;&#x5E94;&#x7528; .title &#x6837;&#x5F0F;&#xFF0C;&#x901A;&#x5E38;&#x4F7F;&#x7528;h1&#x5143;&#x7D20;&#x3002;</p>
<p>&#x6309;&#x94AE; - &#x5BF9;&#x7528;&#x4F5C;&#x6309;&#x94AE;&#x7684;&#x5143;&#x7D20;&#xFF0C;&#x5E94;&#x7528; .button &#x6837;&#x5F0F;&#xFF0C;&#x901A;&#x5E38;&#x4F7F;&#x7528; button &#x6216; a &#x5143;&#x7D20;&#x4F5C;&#x4E3A;&#x6309;&#x94AE;&#x3002;&#x6CE8;&#x610F;&#x6309;&#x94AE;&#x5C06;&#x4F7F;&#x7528; .bar &#x7684;&#x914D;&#x8272;&#x65B9;&#x6848;&#x3002;</p>
<p>&#x5DE5;&#x5177;&#x680F; - &#x5DE5;&#x5177;&#x680F;&#x5305;&#x542B;&#x4E00;&#x7EC4;&#x6309;&#x94AE;&#x3002;&#x5BF9;&#x7528;&#x4F5C;&#x5DE5;&#x5177;&#x680F;&#x7684;&#x5143;&#x7D20;&#xFF0C;&#x5E94;&#x7528; .button-bar &#x6837;&#x5F0F;&#xFF0C;&#x901A;&#x5E38; &#x4F7F;&#x7528; div &#x5143;&#x7D20;&#x4F5C;&#x4E3A;&#x5DE5;&#x5177;&#x680F;&#x3002;</p>
<h4 id="bar&#x5D4C;&#x5165;input"><a href="#bar&#x5D4C;&#x5165;input" class="headerlink" title="bar&#x5D4C;&#x5165;input"></a>bar&#x5D4C;&#x5165;input</h4><p>&#x5728;&#x6761;&#x5757;&#x5143;&#x7D20;&#x4E0A;&#x5E94;&#x7528; .item-input-inset &#x6837;&#x5F0F;<br>&#x5C06;input&#x5305;&#x88F9;&#x5728;&#x5E94;&#x7528; .item-input-wrapper &#x6837;&#x5F0F;&#x7684;&#x5143;&#x7D20;&#x5185;</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;bar bar-subheader light-bg item-input-inset&quot;</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">a</span> <span class="attr">class</span>=<span class="string">&quot;button button-clear icon-right ion-android-arrow-dropdown&quot;</span>&gt;</span>&#x5317;&#x4EAC;<span class="tag">&lt;/<span class="name">a</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">label</span> <span class="attr">class</span>=<span class="string">&quot;item-input-wrapper&quot;</span>&gt;</span></div><div class="line">      <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;text&quot;</span> <span class="attr">placeholder</span>=<span class="string">&quot;&#x8F93;&#x5165;&#x67E5;&#x8BE2;&#x4FE1;&#x606F;&quot;</span>&gt;</span></div><div class="line">    <span class="tag">&lt;/<span class="name">label</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></div></pre></td></tr></table></figure>
<h3 id="&#x5C0F;&#x7ED3;"><a href="#&#x5C0F;&#x7ED3;" class="headerlink" title="&#x5C0F;&#x7ED3;"></a>&#x5C0F;&#x7ED3;</h3><p><img src="/2016/12/07/s016-ioionic-css&#x7B14;&#x8BB0;/ionic04.png" alt="&#x5C0F;&#x7ED3;"></p>
<h3 id="&#x989C;&#x8272;-amp-&#x56FE;&#x6807;"><a href="#&#x989C;&#x8272;-amp-&#x56FE;&#x6807;" class="headerlink" title="&#x989C;&#x8272;&amp;&#x56FE;&#x6807;"></a>&#x989C;&#x8272;&amp;&#x56FE;&#x6807;</h3><h4 id="&#x8272;&#x5F69;"><a href="#&#x8272;&#x5F69;" class="headerlink" title="&#x8272;&#x5F69;"></a>&#x8272;&#x5F69;</h4><p>ionic&#x5B9A;&#x4E49;&#x4E86;&#x4E5D;&#x79CD;&#x524D;&#x666F;/&#x80CC;&#x666F;/&#x8FB9;&#x6846;&#x7684;&#x8272;&#x5F69;&#x6837;&#x5F0F;&#xFF1A;</p>
<p><img src="/2016/12/07/s016-ioionic-css&#x7B14;&#x8BB0;/ionic05.png" alt="&#x8272;&#x5F69;"></p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">any</span> <span class="attr">class</span>=<span class="string">&quot;positive-bg energized&quot;</span>&gt;</span></div><div class="line">...</div><div class="line"><span class="tag">&lt;/<span class="name">any</span>&gt;</span></div></pre></td></tr></table></figure>
<h4 id="&#x56FE;&#x6807;"><a href="#&#x56FE;&#x6807;" class="headerlink" title="&#x56FE;&#x6807;"></a>&#x56FE;&#x6807;</h4><p>&#x5B98;&#x7F51;&#x5730;&#x5740;&#xFF1A;<a href="http://ionicons.com/" target="_blank" rel="external">http://ionicons.com/</a></p>
<p>.icon - &#x5C06;&#x5143;&#x7D20;&#x58F0;&#x660E;&#x4E3A;&#x56FE;&#x6807;<br>.ion-{icon-name} - &#x58F0;&#x660E;&#x8981;&#x4F7F;&#x7528;&#x7684;&#x5177;&#x4F53;&#x56FE;&#x6807;</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">any</span> <span class="attr">class</span>=<span class="string">&quot;icon ion-ionic calm&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">any</span>&gt;</span></div></pre></td></tr></table></figure>
<p>&#x6BD4;&#x5982;&#xFF1A;</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">button</span> <span class="attr">class</span>=<span class="string">&quot;button button-light icon ion-bug&quot;</span>&gt;</span>&amp;nbsp;&amp;nbsp;&amp;nbsp;bug&amp;nbsp;&amp;nbsp;<span class="tag">&lt;/<span class="name">button</span>&gt;</span></div></pre></td></tr></table></figure>
<h3 id="&#x5185;&#x8FB9;&#x8DDD;"><a href="#&#x5185;&#x8FB9;&#x8DDD;" class="headerlink" title="&#x5185;&#x8FB9;&#x8DDD;"></a>&#x5185;&#x8FB9;&#x8DDD;</h3><p>ionic&#x5B9A;&#x4E49;&#x4E86;&#x5E38;&#x7528;&#x7684;&#x5185;&#x8FB9;&#x8DDD;&#x6837;&#x5F0F;&#xFF1A;</p>
<p>&#x6837;&#x5F0F;&#x540D;&#x5F88;&#x76F4;&#x767D;&#xFF0C;&#x8FB9;&#x8DDD;&#x7EDF;&#x4E00;&#x4E3A;10px&#x3002;&#x53EF;&#x4EE5;&#x5728;&#x4EFB;&#x4F55;&#x5143;&#x7D20;&#x4E0A;&#x5E94;&#x7528;&#x8FD9;&#x4E9B;&#x6837;&#x5F0F;&#x3002;</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">any</span> <span class="attr">class</span>=<span class="string">&quot;padding-top&quot;</span>&gt;</span></div><div class="line">  .padding-top</div><div class="line"><span class="tag">&lt;/<span class="name">any</span>&gt;</span></div></pre></td></tr></table></figure>
<p><img src="/2016/12/07/s016-ioionic-css&#x7B14;&#x8BB0;/ionic06.png" alt="&#x5185;&#x8FB9;&#x8DDD;"></p>
<h3 id="&#x5217;&#x8868;&#x6837;&#x5F0F;"><a href="#&#x5217;&#x8868;&#x6837;&#x5F0F;" class="headerlink" title="&#x5217;&#x8868;&#x6837;&#x5F0F;"></a>&#x5217;&#x8868;&#x6837;&#x5F0F;</h3><h4 id="&#x5217;&#x8868;"><a href="#&#x5217;&#x8868;" class="headerlink" title="&#x5217;&#x8868;"></a>&#x5217;&#x8868;</h4><p>&#x4F7F;&#x7528;.list&#x5B9A;&#x4E49;&#x5217;&#x8868;&#x5BB9;&#x5668;&#xFF0C; &#x4F7F;&#x7528;.item&#x5B9A;&#x4E49;&#x5217;&#x8868;&#x6210;&#x5458;&#xFF1A;</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">any</span> <span class="attr">class</span>=<span class="string">&quot;list&quot;</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">any</span> <span class="attr">class</span>=<span class="string">&quot;item&quot;</span>&gt;</span>...<span class="tag">&lt;/<span class="name">any</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">any</span> <span class="attr">class</span>=<span class="string">&quot;item&quot;</span>&gt;</span>...<span class="tag">&lt;/<span class="name">any</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">any</span> <span class="attr">class</span>=<span class="string">&quot;item&quot;</span>&gt;</span>...<span class="tag">&lt;/<span class="name">any</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">any</span> <span class="attr">class</span>=<span class="string">&quot;item&quot;</span>&gt;</span>...<span class="tag">&lt;/<span class="name">any</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">any</span>&gt;</span></div></pre></td></tr></table></figure>
<p><img src="/2016/12/07/s016-ioionic-css&#x7B14;&#x8BB0;/ionic07.png" alt="&#x5217;&#x8868;"></p>
<h4 id="&#x6210;&#x5458;&#x9879;"><a href="#&#x6210;&#x5458;&#x9879;" class="headerlink" title="&#x6210;&#x5458;&#x9879;"></a>&#x6210;&#x5458;&#x9879;</h4><p>&#x5217;&#x8868;&#x7684;&#x6837;&#x5F0F;&#x5B9A;&#x5236;&#x4E3B;&#x8981;&#x53D1;&#x751F;&#x5728;.item&#x5143;&#x7D20;&#x4E0A;&#x3002;</p>
<p><img src="/2016/12/07/s016-ioionic-css&#x7B14;&#x8BB0;/ionic08.png" alt="&#x6210;&#x5458;&#x9879;"></p>
<h3 id="&#x6309;&#x94AE;"><a href="#&#x6309;&#x94AE;" class="headerlink" title="&#x6309;&#x94AE;"></a>&#x6309;&#x94AE;</h3><p>ionic&#x4F7F;&#x7528;.button&#x6837;&#x5F0F;&#x5B9A;&#x4E49;&#x6309;&#x94AE;&#x5143;&#x7D20;</p>
<p><img src="/2016/12/07/s016-ioionic-css&#x7B14;&#x8BB0;/ionic09.png" alt="&#x6309;&#x94AE;"></p>
<h4 id="&#x5F00;&#x5173;"><a href="#&#x5F00;&#x5173;" class="headerlink" title="&#x5F00;&#x5173;"></a>&#x5F00;&#x5173;</h4><p>&#x5F00;&#x5173;&#x901A;&#x5E38;&#x7528;&#x6765;&#x8BBE;&#x7F6E;&#x4E24;&#x79CD;&#x72B6;&#x6001; - &#x5F00;&#x542F;&#x548C;&#x5173;&#x95ED;</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div></pre></td><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">any</span> <span class="attr">class</span>=<span class="string">&quot;item item-toggle&quot;</span>&gt;</span></div><div class="line">  iMessage</div><div class="line">  <span class="tag">&lt;<span class="name">label</span> <span class="attr">class</span>=<span class="string">&quot;toggle toggle-balanced&quot;</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;checkbox&quot;</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;track&quot;</span>&gt;</span></div><div class="line">      <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;handle&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line">  <span class="tag">&lt;/<span class="name">label</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">any</span>&gt;</span></div></pre></td></tr></table></figure>
<p><img src="/2016/12/07/s016-ioionic-css&#x7B14;&#x8BB0;/ionic10.png" alt="&#x5F00;&#x5173;"></p>
<h4 id="&#x590D;&#x9009;"><a href="#&#x590D;&#x9009;" class="headerlink" title="&#x590D;&#x9009;"></a>&#x590D;&#x9009;</h4><p>&#x590D;&#x9009;&#x6846;&#x901A;&#x5E38;&#x7528;&#x6765;&#x5728;&#x4E00;&#x7EC4;&#x5217;&#x8868;&#x4E2D;&#x9009;&#x4E2D;&#x90E8;&#x5206;&#x6210;&#x5458;</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">any</span> <span class="attr">class</span>=<span class="string">&quot;item item-chexkbox&quot;</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">any</span> <span class="attr">class</span>=<span class="string">&quot;checkbox&quot;</span>&gt;</span></div><div class="line">        <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;checkbox&quot;</span>&gt;</span></div><div class="line">    <span class="tag">&lt;/<span class="name">any</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">any</span>&gt;</span></div></pre></td></tr></table></figure>
<p><img src="/2016/12/07/s016-ioionic-css&#x7B14;&#x8BB0;/ionic11.png" alt="&#x590D;&#x9009;"></p>
<h4 id="&#x5355;&#x9009;"><a href="#&#x5355;&#x9009;" class="headerlink" title="&#x5355;&#x9009;"></a>&#x5355;&#x9009;</h4><figure class="highlight html"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">label</span> <span class="attr">class</span>=<span class="string">&quot;item item-radio&quot;</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;radio&quot;</span> <span class="attr">name</span>=<span class="string">&quot;group&quot;</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;item-content&quot;</span>&gt;</span>f&#x652F;&#x4ED8;&#x5B9D;&#x5BA2;&#x6237;&#x7AEF;&#x652F;&#x4ED8;<span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">i</span> <span class="attr">class</span>=<span class="string">&quot;radio-icon ion-checkmark assertive&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">i</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">label</span>&gt;</span></div></pre></td></tr></table></figure>
<p>&#x5355;&#x9009;&#x6309;&#x94AE;&#x901A;&#x5E38;&#x4E0D;&#x5355;&#x72EC;&#x4F7F;&#x7528;&#xFF0C;&#x5C06;&#x4ED6;&#x4EEC;&#x653E;&#x5165;&#x4E00;&#x4E2A;&#x5217;&#x8868;&#x4E2D;</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">any</span> <span class="attr">class</span>=<span class="string">&quot;list&quot;</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">any</span> <span class="attr">class</span>=<span class="string">&quot;item item-radio&quot;</span>&gt;</span>...<span class="tag">&lt;/<span class="name">any</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">any</span> <span class="attr">class</span>=<span class="string">&quot;item item-radio&quot;</span>&gt;</span>...<span class="tag">&lt;/<span class="name">any</span>&gt;</span></div><div class="line">    ...</div><div class="line"><span class="tag">&lt;/<span class="name">any</span>&gt;</span></div></pre></td></tr></table></figure>
<p><img src="/2016/12/07/s016-ioionic-css&#x7B14;&#x8BB0;/ionic12.png" alt="&#x5355;&#x9009;"></p>
<h4 id="&#x6ED1;&#x52A8;&#x6761;"><a href="#&#x6ED1;&#x52A8;&#x6761;" class="headerlink" title="&#x6ED1;&#x52A8;&#x6761;"></a>&#x6ED1;&#x52A8;&#x6761;</h4><figure class="highlight html"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">any</span> <span class="attr">class</span>=<span class="string">&quot;item range&quot;</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">any</span> <span class="attr">class</span>=<span class="string">&quot;icon icon-volume-low&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">any</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;range&quot;</span> <span class="attr">name</span>=<span class="string">&quot;volume&quot;</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">any</span> <span class="attr">class</span>=<span class="string">&quot;icon icon-volume-high&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">any</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">any</span>&gt;</span></div></pre></td></tr></table></figure>
<p><img src="/2016/12/07/s016-ioionic-css&#x7B14;&#x8BB0;/ionic13.png" alt="&#x6ED1;&#x52A8;&#x6761;"></p>
<h4 id="&#x9009;&#x62E9;&#x6846;"><a href="#&#x9009;&#x62E9;&#x6846;" class="headerlink" title="&#x9009;&#x62E9;&#x6846;"></a>&#x9009;&#x62E9;&#x6846;</h4><figure class="highlight html"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div></pre></td><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">any</span> <span class="attr">class</span>=<span class="string">item</span> <span class="attr">item-select</span>&#x201D;&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">label</span> <span class="attr">class</span>=<span class="string">&quot;item-input&quot;</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">any</span> <span class="attr">class</span>=<span class="string">&quot;input-label&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">any</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">select</span>&gt;</span></div><div class="line">        <span class="tag">&lt;<span class="name">option</span>&gt;</span>...<span class="tag">&lt;/<span class="name">option</span>&gt;</span></div><div class="line">        <span class="tag">&lt;<span class="name">option</span>&gt;</span>...<span class="tag">&lt;/<span class="name">option</span>&gt;</span></div><div class="line">        ...</div><div class="line">    <span class="tag">&lt;/<span class="name">select</span>&gt;</span></div><div class="line">  <span class="tag">&lt;/<span class="name">label</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">any</span>&gt;</span></div></pre></td></tr></table></figure>
<p><img src="/2016/12/07/s016-ioionic-css&#x7B14;&#x8BB0;/ionic14.png" alt="&#x9009;&#x62E9;&#x6846;"></p>
<h4 id="&#x9009;&#x9879;&#x5361;"><a href="#&#x9009;&#x9879;&#x5361;" class="headerlink" title="&#x9009;&#x9879;&#x5361;"></a>&#x9009;&#x9879;&#x5361;</h4><p>&#x9009;&#x9879;&#x5361;&#x662F;&#x4E00;&#x4E2A;&#x53EF;&#x4EE5;&#x5305;&#x542B;&#x591A;&#x4E2A;&#x6309;&#x94AE;&#x6216;&#x94FE;&#x63A5;&#x7684;&#x5BB9;&#x5668;&#xFF0C;&#x901A;&#x5E38;&#x7528;&#x4E8E;&#x63D0;&#x4F9B;&#x4E00;&#x81F4;&#x7684;&#x5BFC;&#x822A;&#x4F53;&#x9A8C;&#x3002; ionic&#x4E2D;&#x4F7F;&#x7528;.tabs&#x6837;&#x5F0F;&#x58F0;&#x660E;&#x9009;&#x9879;&#x5361;&#xFF0C;&#x4F7F;&#x7528;.tab-item&#x6837;&#x5F0F;&#x58F0;&#x660E;&#x9009;&#x9879;&#x5361; &#x6210;&#x5458;</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">any</span> <span class="attr">class</span>=<span class="string">&quot;tabs&quot;</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">any</span> <span class="attr">class</span>=<span class="string">&quot;tab-item&quot;</span>&gt;</span>...<span class="tag">&lt;/<span class="name">any</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">any</span> <span class="attr">class</span>=<span class="string">&quot;tab-item&quot;</span>&gt;</span>...<span class="tag">&lt;/<span class="name">any</span>&gt;</span></div><div class="line">    ...</div><div class="line"><span class="tag">&lt;/<span class="name">any</span>&gt;</span></div></pre></td></tr></table></figure>
<p><img src="/2016/12/07/s016-ioionic-css&#x7B14;&#x8BB0;/ionic15.png" alt="&#x9009;&#x9879;&#x5361;"></p>
<h2 id="&#x5FBD;&#x7AE0;"><a href="#&#x5FBD;&#x7AE0;" class="headerlink" title="&#x5FBD;&#x7AE0;"></a>&#x5FBD;&#x7AE0;</h2><p>&#x4F7F;&#x7528; .badge &#x6837;&#x5F0F;&#x63D2;&#x5165;&#x5FBD;&#x7AE0;&#x5143;&#x7D20;<br>&#x5728; .tab-item &#x540C;&#x7EA7;&#x58F0;&#x660E; .has-badge &#x6837;&#x5F0F;</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">any</span> <span class="attr">class</span>=<span class="string">&quot;tabs&quot;</span>&gt;</span></div><div class="line"><span class="tag">&lt;<span class="name">any</span> <span class="attr">class</span>=<span class="string">&quot;tab-item has-badge&quot;</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">any</span> <span class="attr">class</span>=<span class="string">&quot;badge&quot;</span>&gt;</span>...<span class="tag">&lt;/<span class="name">any</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">any</span>&gt;</span></div><div class="line">...</div><div class="line"><span class="tag">&lt;/<span class="name">any</span>&gt;</span></div></pre></td></tr></table></figure>
<h2 id="&#x793A;&#x4F8B;&#x4EE3;&#x7801;"><a href="#&#x793A;&#x4F8B;&#x4EE3;&#x7801;" class="headerlink" title="&#x793A;&#x4F8B;&#x4EE3;&#x7801;"></a>&#x793A;&#x4F8B;&#x4EE3;&#x7801;</h2><figure class="highlight html"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div></pre></td><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">ion-view</span> <span class="attr">id</span>=<span class="string">&quot;guidePage&quot;</span> <span class="attr">view-title</span>=<span class="string">&quot;&#x5F15;&#x5BFC;&#x9875;&quot;</span> <span class="attr">cache-view</span>=<span class="string">&quot;false&quot;</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;bar bar-header calm-bg&quot;</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">h1</span> <span class="attr">class</span>=<span class="string">&quot;title&quot;</span>&gt;</span>&#x5934;&#x90E8;&#x533A;&#x57DF;<span class="tag">&lt;/<span class="name">h1</span>&gt;</span></div><div class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;bar bar-subheader assertive-bg has-subheader&quot;</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">button</span> <span class="attr">class</span>=<span class="string">&quot;button button-energized&quot;</span>&gt;</span>&#x4F1A;&#x5458;&#x767B;&#x5F55;<span class="tag">&lt;/<span class="name">button</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">button</span> <span class="attr">class</span>=<span class="string">&quot;button balanced-bg&quot;</span>&gt;</span>&#x6CE8;&#x518C;&#x4F1A;&#x5458;<span class="tag">&lt;/<span class="name">button</span>&gt;</span></div><div class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;bar bar-subheader positive-bg item-input-inset&quot;</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">a</span> <span class="attr">class</span>=<span class="string">&quot;button button-clear icon-right ion-android-arrow-dropdown&quot;</span>&gt;</span>&#x5317;&#x4EAC;<span class="tag">&lt;/<span class="name">a</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">label</span> <span class="attr">class</span>=<span class="string">&quot;item-input-wrapper&quot;</span>&gt;</span></div><div class="line">      <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;text&quot;</span> <span class="attr">placeholder</span>=<span class="string">&quot;&#x8F93;&#x5165;&#x67E5;&#x8BE2;&#x4FE1;&#x606F;&quot;</span>&gt;</span></div><div class="line">    <span class="tag">&lt;/<span class="name">label</span>&gt;</span></div><div class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;scroll-content balanced-bg has-header has-subheader has-footer has-subfooter&quot;</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;list&quot;</span>&gt;</span></div><div class="line">      <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;item&quot;</span>&gt;</span>&#x5217;&#x8868;1<span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line">      <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;item&quot;</span>&gt;</span>&#x5217;&#x8868;2<span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line">      <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;item&quot;</span>&gt;</span>&#x5217;&#x8868;3<span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line">      <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;item&quot;</span>&gt;</span>&#x5217;&#x8868;4<span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line">      <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;item&quot;</span>&gt;</span></div><div class="line">        <span class="tag">&lt;<span class="name">button</span> <span class="attr">class</span>=<span class="string">&quot;button icon ion-ios-cart royal-bg&quot;</span>&gt;</span>&amp;nbsp;&amp;nbsp;&amp;nbsp;&#x8D2D;&#x7269;&#x8F66;&amp;nbsp;&amp;nbsp;<span class="tag">&lt;/<span class="name">button</span>&gt;</span></div><div class="line">        <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;badge badge-assertive&quot;</span>&gt;</span>34<span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line">      <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;bar bar-subfooter royal-bg&quot;</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;button-bar&quot;</span>&gt;</span></div><div class="line">      <span class="tag">&lt;<span class="name">button</span> <span class="attr">class</span>=<span class="string">&quot;button button-energized&quot;</span>&gt;</span>&#x6309;&#x94AE;1<span class="tag">&lt;/<span class="name">button</span>&gt;</span></div><div class="line">      <span class="tag">&lt;<span class="name">button</span> <span class="attr">class</span>=<span class="string">&quot;button button-energized&quot;</span>&gt;</span>&#x6309;&#x94AE;2<span class="tag">&lt;/<span class="name">button</span>&gt;</span></div><div class="line">      <span class="tag">&lt;<span class="name">button</span> <span class="attr">class</span>=<span class="string">&quot;button balanced-bg&quot;</span>&gt;</span>&#x6309;&#x94AE;3<span class="tag">&lt;/<span class="name">button</span>&gt;</span></div><div class="line">      <span class="tag">&lt;<span class="name">button</span> <span class="attr">class</span>=<span class="string">&quot;button balanced-bg&quot;</span>&gt;</span>&#x6309;&#x94AE;4<span class="tag">&lt;/<span class="name">button</span>&gt;</span></div><div class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;bar bar-footer dark-bg&quot;</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">button</span> <span class="attr">class</span>=<span class="string">&quot;button button-light icon ion-bug&quot;</span>&gt;</span>&amp;nbsp;&amp;nbsp;&amp;nbsp;bug&amp;nbsp;&amp;nbsp;<span class="tag">&lt;/<span class="name">button</span>&gt;</span></div><div class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">ion-view</span>&gt;</span></div></pre></td></tr></table></figure>
<h2 id="&#x6548;&#x679C;&#x56FE;"><a href="#&#x6548;&#x679C;&#x56FE;" class="headerlink" title="&#x6548;&#x679C;&#x56FE;"></a>&#x6548;&#x679C;&#x56FE;</h2><p><img src="/2016/12/07/s016-ioionic-css&#x7B14;&#x8BB0;/ionic16.png" alt="&#x6548;&#x679C;&#x56FE;"></p>

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        
  <div style="padding: 10px 0; margin: 20px auto; width: 90%; text-align: center;">
    <div>感谢您的支持！</div>
    <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
      <span>打 赏</span>
    </button>
    <div id="QR" style="display: none;">
      
        <div id="wechat" style="display: inline-block">
          <img id="wechat_qr" src="http://ofy7k3v4s.bkt.clouddn.com/wcpayCode.jpg" alt="Hongqin Ma WeChat Pay"/>
          <p>微信打赏</p>
        </div>
      
      
        <div id="alipay" style="display: inline-block">
          <img id="alipay_qr" src="http://ofy7k3v4s.bkt.clouddn.com/apayCode.jpg" alt="Hongqin Ma Alipay"/>
          <p>支付宝打赏</p>
        </div>
      
    </div>
  </div>


      
    </div>

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/ionic/" rel="tag">#ionic</a>
          
        </div>
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2016/12/05/s015-React学习笔记/" rel="next" title="React学习笔记">
                <i class="fa fa-chevron-left"></i> React学习笔记
              </a>
            
          </div>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2016/12/09/s016-ionic-js笔记/" rel="prev" title="ionic js笔记">
                ionic js笔记 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
        <div class="ds-share flat" data-thread-key="2016/12/07/s016-ioionic-css笔记/"
     data-title="ionic css笔记"
     data-content=""
     data-url="https://hongqinma.github.io/2016/12/07/s016-ioionic-css笔记/">
  <div class="ds-share-inline">
    <ul  class="ds-share-icons-16">

      <li data-toggle="ds-share-icons-more"><a class="ds-more" href="javascript:void(0);">分享到：</a></li>
      <li><a class="ds-weibo" href="javascript:void(0);" data-service="weibo">微博</a></li>
      <li><a class="ds-qzone" href="javascript:void(0);" data-service="qzone">QQ空间</a></li>
      <li><a class="ds-qqt" href="javascript:void(0);" data-service="qqt">腾讯微博</a></li>
      <li><a class="ds-wechat" href="javascript:void(0);" data-service="wechat">微信</a></li>

    </ul>
    <div class="ds-share-icons-more">
    </div>
  </div>
</div>
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
      <div class="ds-thread" data-thread-key="2016/12/07/s016-ioionic-css笔记/"
           data-title="ionic css笔记" data-url="https://hongqinma.github.io/2016/12/07/s016-ioionic-css笔记/">
      </div>
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            Table of Contents
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            Overview
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel ">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="//schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/images/photo.jpg"
               alt="Hongqin Ma" />
          <p class="site-author-name" itemprop="name">Hongqin Ma</p>
          <p class="site-description motion-element" itemprop="description">Spell at all costs， to rush you in the future. </p>
        </div>
        <nav class="site-state motion-element">
          <div class="site-state-item site-state-posts">
            <a href="/archives">
              <span class="site-state-item-count">68</span>
              <span class="site-state-item-name">posts</span>
            </a>
          </div>

          
            <div class="site-state-item site-state-categories">
              <a href="/categories">
                <span class="site-state-item-count">16</span>
                <span class="site-state-item-name">categories</span>
              </a>
            </div>
          

          
            <div class="site-state-item site-state-tags">
              <a href="/tags">
                <span class="site-state-item-count">57</span>
                <span class="site-state-item-name">tags</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://github.com/HongqinMa" target="_blank" title="GitHub">
                  
                    <i class="fa fa-fw fa-github"></i>
                  
                  GitHub
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="https://twitter.com/HongqinMa" target="_blank" title="Twitter">
                  
                    <i class="fa fa-fw fa-twitter"></i>
                  
                  Twitter
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="https://www.facebook.com/profile.php?id=100006581058735" target="_blank" title="Facebook">
                  
                    <i class="fa fa-fw fa-facebook"></i>
                  
                  Facebook
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="http://www.zhihu.com/people/HirakuMa" target="_blank" title="知乎">
                  
                    <i class="fa fa-fw fa-share-alt"></i>
                  
                  知乎
                </a>
              </span>
            
          
        </div>

        
        

        
        
          <div class="links-of-blogroll motion-element links-of-blogroll-inline">
            <div class="links-of-blogroll-title">
              <i class="fa  fa-fw fa-globe"></i>
              Links
            </div>
            <ul class="links-of-blogroll-list">
              
                <li class="links-of-blogroll-item">
                  <a href="http://www.cnblogs.com/rubylouvre/" title="司徒正美" target="_blank">司徒正美</a>
                </li>
              
                <li class="links-of-blogroll-item">
                  <a href="http://www.cnblogs.com/sanshi/" title="三生石上" target="_blank">三生石上</a>
                </li>
              
                <li class="links-of-blogroll-item">
                  <a href="http://www.cnblogs.com/TomXu/" title="汤姆大叔" target="_blank">汤姆大叔</a>
                </li>
              
                <li class="links-of-blogroll-item">
                  <a href="http://gold.xitu.io/" title="掘金" target="_blank">掘金</a>
                </li>
              
                <li class="links-of-blogroll-item">
                  <a href="https://segmentfault.com/" title="segmentfault" target="_blank">segmentfault</a>
                </li>
              
                <li class="links-of-blogroll-item">
                  <a href="http://www.jianshu.com/users/1cbb94e5ed4d/latest_articles" title="简书" target="_blank">简书</a>
                </li>
              
                <li class="links-of-blogroll-item">
                  <a href="https://home.cnblogs.com/" title="博客园" target="_blank">博客园</a>
                </li>
              
                <li class="links-of-blogroll-item">
                  <a href="https://www.awesomes.cn/" title="Awesomes" target="_blank">Awesomes</a>
                </li>
              
            </ul>
          </div>
        

      </section>

      
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">
            
              
            
            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#ionic-Css"><span class="nav-number">1.</span> <span class="nav-text">ionic Css</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#ionic-css是什么"><span class="nav-number">1.1.</span> <span class="nav-text">ionic css是什么</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Ionic-css组成"><span class="nav-number">1.2.</span> <span class="nav-text">Ionic css组成</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#布局"><span class="nav-number">1.3.</span> <span class="nav-text">布局</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#定高条块定义"><span class="nav-number">1.3.1.</span> <span class="nav-text">定高条块定义</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#条块位置"><span class="nav-number">1.3.2.</span> <span class="nav-text">条块位置</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#内容"><span class="nav-number">1.4.</span> <span class="nav-text">内容</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#bar子元素"><span class="nav-number">1.5.</span> <span class="nav-text">bar子元素</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#bar嵌入input"><span class="nav-number">1.5.1.</span> <span class="nav-text">bar嵌入input</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#小结"><span class="nav-number">1.6.</span> <span class="nav-text">小结</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#颜色-amp-图标"><span class="nav-number">1.7.</span> <span class="nav-text">颜色&图标</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#色彩"><span class="nav-number">1.7.1.</span> <span class="nav-text">色彩</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#图标"><span class="nav-number">1.7.2.</span> <span class="nav-text">图标</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#内边距"><span class="nav-number">1.8.</span> <span class="nav-text">内边距</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#列表样式"><span class="nav-number">1.9.</span> <span class="nav-text">列表样式</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#列表"><span class="nav-number">1.9.1.</span> <span class="nav-text">列表</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#成员项"><span class="nav-number">1.9.2.</span> <span class="nav-text">成员项</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#按钮"><span class="nav-number">1.10.</span> <span class="nav-text">按钮</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#开关"><span class="nav-number">1.10.1.</span> <span class="nav-text">开关</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#复选"><span class="nav-number">1.10.2.</span> <span class="nav-text">复选</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#单选"><span class="nav-number">1.10.3.</span> <span class="nav-text">单选</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#滑动条"><span class="nav-number">1.10.4.</span> <span class="nav-text">滑动条</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#选择框"><span class="nav-number">1.10.5.</span> <span class="nav-text">选择框</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#选项卡"><span class="nav-number">1.10.6.</span> <span class="nav-text">选项卡</span></a></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#徽章"><span class="nav-number">2.</span> <span class="nav-text">徽章</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#示例代码"><span class="nav-number">3.</span> <span class="nav-text">示例代码</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#效果图"><span class="nav-number">4.</span> <span class="nav-text">效果图</span></a></li></ol></div>
            
          </div>
        </section>
      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2016</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Hongqin Ma</span>
</div>

<div class="powered-by">
  Powered by <a class="theme-link" href="https://hexo.io">Hexo</a>
</div>

<div class="theme-info">
  Theme -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Muse
  </a>
</div>

<script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<span id="busuanzi_container_site_pv">
    &nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;Page Views: <span id="busuanzi_value_site_pv"></span> 
</span>

        

<div class="busuanzi-count">

  <script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>

  
    <span class="site-uv"><i class="fa fa-user"></i><span class="busuanzi-value" id="busuanzi_value_site_uv"></span></span>
  

  
    <span class="site-pv"><i class="fa fa-eye"></i><span class="busuanzi-value" id="busuanzi_value_site_pv"></span></span>
  
  
</div>



        
      </div>
    </footer>

    <div class="back-to-top">
      <i class="fa fa-arrow-up"></i>
    </div>
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  



  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.0.2"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.0.2"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.0.2"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.0.2"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.0.2"></script>



  

  
    
  

  <script type="text/javascript">
    var duoshuoQuery = {short_name:"Hiraku"};
    (function() {
      var ds = document.createElement('script');
      ds.type = 'text/javascript';ds.async = true;
      ds.id = 'duoshuo-script';
      ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
      ds.charset = 'UTF-8';
      (document.getElementsByTagName('head')[0]
      || document.getElementsByTagName('body')[0]).appendChild(ds);
    })();
  </script>

  
    
    <script src="/lib/ua-parser-js/dist/ua-parser.min.js?v=0.7.9"></script>
    <script src="/js/src/hook-duoshuo.js"></script>
  






  
  

  

  

  
  <script src="https://cdn1.lncld.net/static/js/av-core-mini-0.6.1.js"></script>
  <script>AV.initialize("PPmoIQxeu8Sd21h6Tl9TthNx-gzGzoHsz", "rTvbY2H7DvWzRipiBwn72RQ4");</script>
  <script>
    function showTime(Counter) {
      var query = new AV.Query(Counter);
      var entries = [];
      var $visitors = $(".leancloud_visitors");

      $visitors.each(function () {
        entries.push( $(this).attr("id").trim() );
      });

      query.containedIn('url', entries);
      query.find()
        .done(function (results) {
          var COUNT_CONTAINER_REF = '.leancloud-visitors-count';

          if (results.length === 0) {
            $visitors.find(COUNT_CONTAINER_REF).text(0);
            return;
          }

          for (var i = 0; i < results.length; i++) {
            var item = results[i];
            var url = item.get('url');
            var time = item.get('time');
            var element = document.getElementById(url);

            $(element).find(COUNT_CONTAINER_REF).text(time);
          }
          for(var i = 0; i < entries.length; i++) {
            var url = entries[i];
            var element = document.getElementById(url);
            var countSpan = $(element).find(COUNT_CONTAINER_REF);
            if( countSpan.text() == '') {
              countSpan.text(0);
            }
          }
        })
        .fail(function (object, error) {
          console.log("Error: " + error.code + " " + error.message);
        });
    }

    function addCount(Counter) {
      var $visitors = $(".leancloud_visitors");
      var url = $visitors.attr('id').trim();
      var title = $visitors.attr('data-flag-title').trim();
      var query = new AV.Query(Counter);

      query.equalTo("url", url);
      query.find({
        success: function(results) {
          if (results.length > 0) {
            var counter = results[0];
            counter.fetchWhenSave(true);
            counter.increment("time");
            counter.save(null, {
              success: function(counter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(counter.get('time'));
              },
              error: function(counter, error) {
                console.log('Failed to save Visitor num, with error message: ' + error.message);
              }
            });
          } else {
            var newcounter = new Counter();
            /* Set ACL */
            var acl = new AV.ACL();
            acl.setPublicReadAccess(true);
            acl.setPublicWriteAccess(true);
            newcounter.setACL(acl);
            /* End Set ACL */
            newcounter.set("title", title);
            newcounter.set("url", url);
            newcounter.set("time", 1);
            newcounter.save(null, {
              success: function(newcounter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(newcounter.get('time'));
              },
              error: function(newcounter, error) {
                console.log('Failed to create');
              }
            });
          }
        },
        error: function(error) {
          console.log('Error:' + error.code + " " + error.message);
        }
      });
    }

    $(function() {
      var Counter = AV.Object.extend("Counter");
      if ($('.leancloud_visitors').length == 1) {
        addCount(Counter);
      } else if ($('.post-title-link').length > 1) {
        showTime(Counter);
      }
    });
  </script>



  

  

  
  
  <!-- custom analytics part create by xiamo -->
<script src="https://cdn1.lncld.net/static/js/av-core-mini-0.6.1.js"></script>
<script>AV.initialize("PPmoIQxeu8Sd21h6Tl9TthNx-gzGzoHsz", "rTvbY2H7DvWzRipiBwn72RQ4");</script>
<script>
function showTime(Counter) {
  var query = new AV.Query(Counter);
  $(".leancloud_visitors").each(function() {
    var url = $(this).attr("id").trim();
    query.equalTo("url", url);
    query.find({
      success: function(results) {
        if (results.length == 0) {
          var content = '0 ' + $(document.getElementById(url)).text();
          $(document.getElementById(url)).text(content);
          return;
        }
        for (var i = 0; i < results.length; i++) {
          var object = results[i];
          var content = object.get('time') + ' ' + $(document.getElementById(url)).text();
          $(document.getElementById(url)).text(content);
        }
      },
      error: function(object, error) {
        console.log("Error: " + error.code + " " + error.message);
      }
    });

  });
}

function addCount(Counter) {
  var Counter = AV.Object.extend("Counter");
  url = $(".leancloud_visitors").attr('id').trim();
  title = $(".leancloud_visitors").attr('data-flag-title').trim();
  var query = new AV.Query(Counter);
  query.equalTo("url", url);
  query.find({
    success: function(results) {
      if (results.length > 0) {
        var counter = results[0];
        counter.fetchWhenSave(true);
        counter.increment("time");
        counter.save(null, {
          success: function(counter) {
            var content =  counter.get('time') + ' ' + $(document.getElementById(url)).text();
            $(document.getElementById(url)).text(content);
          },
          error: function(counter, error) {
            console.log('Failed to save Visitor num, with error message: ' + error.message);
          }
        });
      } else {
        var newcounter = new Counter();
        newcounter.set("title", title);
        newcounter.set("url", url);
        newcounter.set("time", 1);
        newcounter.save(null, {
          success: function(newcounter) {
              console.log("newcounter.get('time')="+newcounter.get('time'));
            var content = newcounter.get('time') + ' ' + $(document.getElementById(url)).text();
            $(document.getElementById(url)).text(content);
          },
          error: function(newcounter, error) {
            console.log('Failed to create');
          }
        });
      }
    },
    error: function(error) {
      console.log('Error:' + error.code + " " + error.message);
    }
  });
}
$(function() {
  var Counter = AV.Object.extend("Counter");
  if ($('.leancloud_visitors').length == 1) {
    addCount(Counter);
  } else if ($('.post-title-link').length > 1) {
    showTime(Counter);
  }
}); 
</script>

  
</body>
</html>
